// File: tests/cli_test.rs
#[cfg(test)]
mod tests {
    use std::process::Command;

    #[test]
    fn test_submit_flow() {
        let output = Command::new("cargo")
            .args(&["run", "--", "submit-post", "tests/real_data/ibugce_post.md"])
            .output()
            .unwrap();
        
        assert!(String::from_utf8_lossy(&output.stdout).contains("手动提交"));
        assert!(std::path::Path::new("post_template.txt").exists());
    }
}
